#include<iostream>
using namespace std;

class Point {
public:
    // 有参数赋默认值和类体中进行定义
    Point(int xx=0, int yy=0) { x = xx; y = yy; cout<<"调用普通的构造函数"<<endl;}
    int getX() { return x; }
    int getY() { return y; }
private:
    int x, y;
};

int main()
{
    // 创建一个包含两个Point对象的数组，x,y分别初始化为(1,2)和（3，4）
    Point points[2] = {Point(1, 2), Point(3, 4)};

    // 遍历数组并打印每个Point对象的x值
    for (int i = 0; i < 2; i++) {
        cout << "Point " << i+1 << " x value: " << points[i].getX() << endl;
    }

    return 0;
}